from gevent import monkey

import client

monkey.patch_all()
import gevent
import time

c1 = client.Demand()
c2 = client.Demand()

gTime = time.time()
def a():
    while True:
        gevent.sleep(1)
        result = c1.find('1')
        print time.time() - gTime, result
def b():
    while True:
        gevent.sleep(1)
        result = c2.find('2')
        print time.time() - gTime, result

gevent.spawn(a).start()
gevent.spawn(b).start()



while True:
    gevent.sleep(100)


